package com.example.rbac.service.impl;

import com.example.rbac.entity.Page;
import com.example.rbac.entity.Role;
import com.example.rbac.entity.User;
import com.example.rbac.mapper.UserMapper;
import com.example.rbac.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/9/25.
 */
@Service
public class UserServiceImpl extends CurdServiceImpl<UserMapper, User> implements UserService {

    private static final String USER_KEY = "user_key";

    @Override
    public User findUserByUserNameAndPwd(Map<String, String> user) {
        return repository.findUserByUserNameAndPwd(user);
    }

    @Override
    public Integer updateById(User user) {
        return repository.updateById(user);
    }

    @Override
    public List<String> findRoleByUserId(String userId) {
        return repository.findRoleByUserId(userId);
    }

    @Override
    public List<Role> findRoleById(List<String> list) {
        return repository.findRoleById(list);
    }

    @Override
    public List<User> findList() {
        return repository.findList();
    }

    @Override
    public Integer updateStateById(User user) {
        return repository.updateStateById(user);
    }

}
